Saltar al contenido principal

Exploiting EDRs For Evasion - Finding Internal Exclusions List

Que show?​

It's well known that security solutions have the option to create exclusions to avoid causing disruptions for organizations. This is an important feature of any security solution that is commonly used by organizations. Many organizations make use of exclusions to avoid having the security solution conflict with their business needs. For example, some EDRs will flag a tool that's legitimately and routinely used by an organization resulting in issues or downtime for the business.

Creating exclusions is an excellent way to defeat an AV or EDR, however, they generally require elevated privileges to create these exclusions. Microsoft Defender AV requires Administrator privileges to set exclusions. But in most cases during engagements setting exclusions would require even more privileges as they would need to be done from the EDR's Admin console.

 It's not uncommon for EDRs to contain pre-built exclusion lists that are kept secret from the public. Mrd0x has previously mentioned hidden exclusions utilized by Microsoft Defender here, here and here.

Additionally, @mgeeky had called out CrowdStrike https://web.archive.org/web/20220728090744/https://mgeeky.tech/uploads/WarCon22%20-%20Modern%20Initial%20Access%20and%20Evasion%20Tactics.pdf for excluding .cpl files from being scanned.

Types of Exclusions​

Security solutions can create exclusions based on any criteria they want. There is no shared standard between security solutions, however, the most common ones are listed below:

  1. File Extension Exclusion - Exclude files with a specific file extension from being scanned.

  2. File Name Exclusion - Exclude files with a specific file name from being scanned.

  3. File Path - Exclude files within a specific file path from being scanned.

  4. Complex Exclusion - Exclude files that meet more than one criteria from being scanned (e.g. file name + path).

It's important to understand that an exclusion doesn't necessarily mean that the security solution won't scan that file entirely. Instead, it indicates that the solution will behave differently and may grant it an exemption that wouldn't apply in normal scenarios. For instance, a file with a specific name might lead the security solution to exempt it from in-memory scans but still scan it on disk.

Renombrar​

Si ejecutar un decryipt.exe el S1 salta y dice neeel y lo mata, pero si lo renombras y lo vuelves a ejecutar ejemplo a SentinelStaticEngineScanner.exe ya ejecuta la wea apestosa. Y no salta una fucking alerta.

No sé si es por el nombre SentinelStaticEngineScanner.exe pero es una excepción que hace el S1 papaw.

DB File Exemption​

One strategy that Microsoft Defender introduced after the series of tweets by mrd0x is that any file that touches the disk will be scanned, regardless of its file extension. Therefore downloading or writing a file will almost certainly not work regardless of where it's dropped.

The one exemption that Microsoft Defender seems to permit is if the malicious file is zipped and then extracted. The malicious file will need to have a file extension that's exempted by Defender, for example .db

 file is a malicious .cpl file that was renamed to have a .db file extension.